import { useGlobalIconFont } from './components/iconfont/helper';
import currentEnv from "../configure/currentEnv"

export default defineAppConfig({
  usingComponents: Object.assign(useGlobalIconFont()),
  pages: [
    ...(currentEnv.project === 'yingjing'?[
    'pages/index/index',
    'pages/movie/index',
    ]:[
    'pages/movie/index',
    'pages/index/index',
    ///   上影小程序主包
    'pages/goods/index/index',
    // 'pages/vip/index/index',
    // 'pages/vip/member-center/index',
    // 'pages/vip/welfare-center/index',
    // 'pages/vip/goods-cate/index',
    ]),
    
    'pages/mine/cinema-index/index',
    'pages/mine/index/index',
    'pages/fineEngine/webView',
    'pages/fineEngine/payment',
    'pages/other/shop-inline/index',
    'pages/other/fans-base/index',
    'pages/other/fans-list/index',
    'pages/other/login/index',
    'pages/other/login/h5/index', // 登录

    'pages/mainPages/tabsPage/index',
    'pages/mainPages/cartSin/index', // 无菜单购物车
    'pages/mainPages/standardCustomerPage/index', //用户自定义页面

    // 'pages/mainPages/paymentCode/index', //付款码
    // 'pages/checkstand/securitySettings/index', //安全设置
    // 'pages/checkstand/getVerification/index', //密码设置
    // 'pages/checkstand/setPassword/index',
    'pages/mainPages/bindWallet/index', //数字钱包绑定入口
    'pages/mainPages/bindWalletCode/index', //数字钱包绑定验证
    'pages/mainPages/bindWalletResult/index', //数字钱包绑定结果
    'pages/mainPages/bindWalletUseInfo/index', //数字钱包使用攻略 
  ],
  subPackages:[{
    root: 'mainPages',
    pages:[
      'city-list/index',
      'event-detail/index',
      'exciting-scene/index',
      'store-homepage/index',
      'reservation/index',
      'watch-add/index',
      'watch-list/index',
      'seat/index',
      'zone/index',
      'unusual/index',
      // 'service/index', //服务
      'clearStorage/index', // H5 用于清除storage

      ////    上影小程序
      'video-detail/index',
      'goods-detail/index',
      'goods-confirm/index',
      'cinema-package/index',
      'select-cinema/index',
      'select-city/index',
      'apply-cinema/index',
      'video-comment/index',
      'plan/index', // 排期
      'map/index', // 地图
      'cinemaSeat/index', // 选座
      'confirmOrder/index', // 下单
      'payResult/index', // 支付结果
      'select-coupon/index',
      'select-card/index',
      'cinema-detail/index',
    ]
  },{
    root: 'mainSubPack',
    pages: [
      'welfare/index', //福利购
      // 'superCostEffective/index', //超划算
      'goodsDetail/index', // 商品详情页
      'takeOut/index', // 外卖主页
      'takeOutShop/index', // 外卖商户页
      'shopList/index', // 店铺列表页
      'shopInfo/index', // 商户主页
      'shoppingMall/index', // 商户商城详情页
      'shopProductFilter/index', // 店铺搜索页面
      'shopPay/index', // 商户买单页
      'shopPayResult/index', // 商户买单结果页
      'newShopTimeline/index', // 新店日历
      'game/index', // 小游戏
      'shopIndustryAll/index', // 商城分类页
      'shopIndustry/index', // 商城分类商品页
      'searchResult/index', // 搜索页
      'customerService/index', //我的客服
      'customerServiceArticle/index', //客服文章详情
      'selfTakePoint/index', //自提点
      'takeOutGoodsDetail/index', //外卖商品详情
      'priceExplain/index', //价格说明
      'appProducts/index', // 更多商品
      'appProducts/appProductsSearch/index', // 更多商品搜索
      'agreement/index', // 协议展示页面
      'aboutMe/index', //关于我们
      'businessLicense/index', //营业执照
      'ICPrecord/index', //ICP备案
      'agreementList/index', //服务协议
    ],
  },
  {
    root: 'orderSubPack',
    pages: [
      'pay-status/index',
      'checkstand/pay/index',
      'checkstand/affirm/index',
      'digitalCard/bindResult/index',
      'digitalCard/card/index',
      'invoiceManagement/invoiceAssistant/index', //发票助手
      'invoiceManagement/addInvoiceHeader/index', //添加发票抬头
      'invoiceManagement/preview/index', //添加发票抬头
      'invoiceManagement/invoiceDetails/index', //发票详情
      'confirmOrder/index', // 确认订单 （购物车结算）
      'digitalCard/bind/index', // 数字货币卡(输入卡号)
      'logisticsList/index', //物流信息
      'logistics/index', //物流详情
      'takeOutConfirmOrder/index', // 外卖确认订单 （购物车结算）
      'takeOutAddress/index', // 外卖选择配送地址
      'submitComment/index', //提交评价页
      'commentAll/index', //全部评价
      'afterSale/applyType/index', //售后 退货换货申请类型选择
      'afterSale/apply/index', //售后 退货换货申请
      'afterSale/applyRefund/index', //售后 退款申请
      'afterSale/applyResult/index', //售后 申请结果
      'afterSale/detail/index', //售后 详情
      'afterSale/applyProcess/index', //售后 进度
      'afterSale/logisticsInput/index', //售后 填写物流信息
      'afterSale/logisticsCompany/index', //售后 选择物流公司
      'payByABC/index', //农行H5支付

      'order-confirm/index',
      'detailTransfer/index',
      'order-options/index',
      'order-list/index',
      'movieDetail/index',
      'orderDetail/index',
      'activityDetail/index',
      'card-detail/index',
      'goodsDetail/index',
      'powerDetail/index',
      'cinemaDetail/index',
    ],
  },
  {
    root: 'giftCardSubPack',
    pages: [
      // 'accountBalance/index', //账户余额
      // 'addGiftCard/index', //无品卡
      'address/index', //地址管理
      'addAddress/index', //新增地址
      // 'invoiceRecord/index',
      'bindGiftCard/index', // 绑定礼品卡
      // 'coupon/index', // 优惠券（确认订单选择 暂无优惠券）
      'giftCardSelect/index', // 礼品卡（确认订单选择礼品可）
      // 'eInvoice/index', // 电子发票
      // 'coinCard/index', // 数字货币卡
      'points/index', // 我的积分
      'pointsRule/index', // 积分规则
      'couponCenter/index', // 优惠券中心
      'myCoupon/index', // 优惠券中心
      'couponProducts/index', // 劵适用商品
      'couponShopList/index', //券适用外卖店铺
      'myGiftCard/index', // 我的礼品卡详情
      'giftCardDetail/index', // 礼品卡详情
      'giftCardShop/index', // 礼品卡商城
      'giftCardRecharge/index', // 礼品卡充值
      'giftCardStores/index', // 礼品卡适用门店列表
      'giftCardBuyResult/index', // 礼品卡支付结果
      'giftCardBind/index', // 绑定礼品卡
      'giftCardOrderList/index', // 礼品卡购买记录
      'activity/index', // 活动列表
      'activityProducts/index', // 活动商品列表
      'salesPromotion/index', // 促销活动商品列表
    ],
  },
  {
    root: 'mineSubPack',
    pages: [
      'information/index',
      'mine-setting/index',
      'mine-change/index',
      'mine-coupon/index',
      'coupon-add/index',
      'coupon-detail/index',
      'card-list/index',
      'card-bind/index',
      'card-detail/index',
      'open-card/index',
      'recharge-card/index',
      'mine-integral/index',
      'mine-deposit/index',
      'member-center/index',
      'order-list/index',
      'order-detail/index',
      'food-detail/index',
      'return-apply/index',
      'foods-return/index',
      'wholeCinema/operWholeCinema/index',
      'wholeCinema/wholeRuleDetail/index',
      'wholeCinema/wholeOrderDetail/index',
      'wholeCinema/wholeCinemaOrder/index',
      'wholeCinema/wholeCinemaPlacard/index',
      'wholeCinema/wholeOrderStatusList/index',
      'plus-center/index',
      'plus-detail/index',
      // 'activity/index/index',
      // 'activity/activity-list/index',
      // 'activity/start/index',
    ],
  }],
  tabBar: {
    selectedColor:'#C80F2F',
    list: currentEnv.project === 'yingjing'?[{
      'pagePath': 'pages/index/index',
      "iconPath": "images/tabbar/home.png",
      "selectedIconPath": "images/tabbar/home-on.png",
      'text': '',
    },
    // {
    //   'pagePath': 'pages/mainPages/tabsPage/index',
    //   "iconPath": "images/tabbar/shopping.png",
    //   "selectedIconPath": "images/tabbar/shopping-on.png",
    //   'text': '',
    // },
    {
      'pagePath': 'pages/mine/index/index',
      "iconPath": "images/tabbar/user.png",
      "selectedIconPath": "images/tabbar/user-on.png",
      'text': '',
    }]:[{
      'pagePath': 'pages/movie/index',
      "iconPath": "images/tabbar/movie.png",
      "selectedIconPath": "images/tabbar/movie-on.png",
      'text': '电影',
    },
    // {
    //   'pagePath': 'pages/vip/index/index',
    //   "iconPath": "images/tabbar/vip.png",
    //   "selectedIconPath": "images/tabbar/vip-on.png",
    //   'text': '会员',
    // },
    {
      'pagePath': 'pages/mainPages/tabsPage/index',
      "iconPath": "images/tabbar/shopping.png",
      "selectedIconPath": "images/tabbar/shopping-on.png",
      'text': '商城',
    },
    {
      'pagePath': 'pages/goods/index/index',
      "iconPath": "images/tabbar/goods.png",
      "selectedIconPath": "images/tabbar/goods-on.png",
      'text': '小食',
    },{
      'pagePath': 'pages/mine/cinema-index/index',
      "iconPath": "images/tabbar/user.png",
      "selectedIconPath": "images/tabbar/user-on.png",
      'text': '我的',
    }]
  },
  window: {
    backgroundTextStyle: 'light',
    navigationBarBackgroundColor: '#fff',
    navigationBarTitleText: 'WeChat',
    navigationBarTextStyle: 'black'
  },
  plugins : {
      "materialPlugin" : {
          "version" : "1.0.12",
          "provider" : "wx4d2deeab3aed6e5a"
      }
  },
  permission: {
    'scope.userLocation': {
      desc: '您的位置信息将被用于定位所在城市'
    }
  },
  requiredPrivateInfos:["getLocation"],
})